Clear

Syntax: @Clear [attribute]

The Clear command used without any parameter will set the value of all Attributes objects to their initial 'Unassigned status'. That is, the state whereby the inference process needs to seek a value, either by prompting the user, calculation or an external call, etc. Optionally, Clear can be followed by an Attribute name to clear the value of the individual object.

See also the topic on Static and Dynamic objects.

Note the clear command will not initialise any other NON-ATTRIBUTE variables or arrays - the InitArray command can be used to clear arrays and other variables.

If you clear an Attribute (e.g. @Clear Color) this will not affect any current values held within all the other properties for that attribute. Commands like @Clear will only reset the status of the main value to its initial 'Unassigned status'.

Examples

@Clear

will clear all attributes.

@Clear Grade

will clear the value of the attribute Grade only. To clear several attributes, repeat the command for each attribute.

It is important to appreciate that clearing attributes can cause unpredictable results, should they be used in the current decision tree for instance. You should use the clear command with care and anticipate the consequences. Consider setting the isDynamic property or using the Evaluate command instead, if you are unsure of exactly what will occur when using Clear.